<template>
  <button :class="className" @click="handleClick" :style="{color, 'background-color': backgroundColor, fontSize}">
    <slot></slot>
  </button>
</template>

<script>
  export default {
    name: "Button",
    props: {
      className: {
        type: String,
        default: ""
      },
      color: {
        type: String,
        default: 'black'
      },
      backgroundColor: {
        type: String,
        default: 'gray'
      },
      fontSize: {
        type: String,
        default: '12px'
      }
    },
    data() {
      return {
        other: '1111',
        other2: '2222'
      }
    },
    methods: {
      handleClick() {
        this.$emit("click");
      }
    }
  };
</script>

<style scoped>
  button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
</style>